import request from '@/utils/request'

// 查询用餐反馈列表
export function listFeedback(query) {
  return request({
    url: '/catering/feedback/list',
    method: 'get',
    params: query
  })
}

// 查询用餐反馈详细
export function getFeedback(id) {
  return request({
    url: '/catering/feedback/' + id,
    method: 'get'
  })
}

// 新增用餐反馈
export function addFeedback(data) {
  return request({
    url: '/catering/feedback/save',
    method: 'post',
    data: data
  })
}

// 修改用餐反馈
export function updateFeedback(data) {
  return request({
    url: '/catering/feedback/save',
    method: 'put',
    data: data
  })
}

// 删除用餐反馈
export function delFeedback(id) {
  return request({
    url: '/catering/feedback/remove/' + id,
    method: 'delete'
  })
}

// 回复用餐反馈
export function responseFeedback(data) {
  return request({
    url: '/catering/feedback/reply',
    method: 'post',
    data: data
  })
}

// 导出用餐反馈
export function exportFeedback(query) {
  return request({
    url: '/catering/feedback/export',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

// 查询所有用餐反馈
export function getAllFeedbacks() {
  return request({
    url: '/catering/feedback/all',
    method: 'get'
  })
} 